local extension = Package:new("zyg_heg_ex")
extension.extensionName = "mod_hegemony"
extension.game_modes_whitelist = { 'nos_heg_mode', 'new_heg_mode' }

local H = require "packages/hegemony/util"
local HM = require "packages/mod_hegemony/util"
local U = require "packages/utility/utility"

Fk:loadTranslationTable{
  ["zyg_heg_ex"] = "国战·逐云阁设计",
  ["zyg_heg"] = "逐云阁",
}
local hejin = General(extension, "zyg_heg__hejin", "wild", 5)
local yanhuo = fk.CreateTriggerSkill{
  name = "zyg__yanhuo",
  anim_type = "special",
  frequency = Skill.Limited,
  events = {fk.DamageCaused, fk.Death},
  can_trigger = function(self, event, target, player, data)
    if player:hasSkill(self, true, true) and target == player and player:usedSkillTimes(self.name, Player.HistoryGame) == 0 then
      if event == fk.DamageCaused and data.card then
        return data.card.trueName == "slash"
      elseif event == fk.Death then
        return true
      end
    end
  end,
  on_cost = Util.TrueFunc,
  on_use = function(self, event, target, player, data)
    local room = player.room
    room:setTag("zyg__yanhuo_count", true)
    if event == fk.DamageCaused then
      data.damage = data.damage + 1
      return
    end
  end,
  refresh_events = {fk.DamageCaused},
  can_refresh = function(self, event, target, player, data)
    return data.card and (data.card or {}).trueName == "slash" and target == player and player.room:getTag("zyg__yanhuo_count")
  end,
  on_refresh = function(self, event, target, player, data)
    data.damage = data.damage + 1
    return
  end,
}
hejin:addSkill(yanhuo)
Fk:loadTranslationTable{
  ["zyg_heg__hejin"] = "何进",
  ["#zyg_heg__hejin"] = "独意误国谋",
  ["designer:zyg_heg__hejin"] = "zyydi",
  ["illustrator:zyg_heg__hejin"] = "凡果_棉鞋",
  ["zyg__yanhuo"] = "延祸",
  [":zyg__yanhuo"] = "锁定技，限定技，当你使用【杀】造成伤害时或当你死亡时，你令本局游戏【杀】造成的伤害+1。",

  ["$zyg__yanhuo1"] = "是谁，泄露了我的计划？",
  ["$zyg__yanhuo2"] = "战斗还没结束呢！",
  ["~zyg_heg__hejin"] = "阉人造反啦！护卫！呀——",
}
return extension